<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js的书写位置</title>
    <script type="text/javascript">

    </script>
</head>
<body>
    <button onclick="alert('hello world')">点我</button>
    <a href="javascript:alert('hello world')">点我</a>
</body>
</html>